package com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifest;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 舱单主Response VO
 *
 * @author chenzheng
 */
@Schema(description = "管理后台 - 舱单主 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ManifestIbsRespVO extends ManifestBaseVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9636")
    private Long id;

    @Schema(description = "soId")
    private Long soId;

    @Schema(description = "是否创建过si")
    private Boolean blnoFlag;

    @Schema(description = "是否可以撤销")
    private Boolean cancelFlag;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "订舱预配")
    private String forecastCntrDesc;

    @Schema(description = "出口航线代码")
    private String laneCodeEx;

    @Schema(description = "舱单货物信息")
    private ManifestCntrDesc manifestCntr;

    @Schema(description = "次舱单货物信息")
    private List<ManifestCntrDesc> slaveCntrs;

    @Schema(description = "是否是北方四港")
    private Boolean manifestFlag;

    @Data
    public static class ManifestCntrDesc {

        @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9636")
        private Long id;

        @Schema(description = "舱单编号")
        private String manifestNo;

        @Schema(description = "20GPX1;40HCX1")
        private String cntrDesc;

        @Schema(description = "货类 聚合")
        private String cargoTypeSum;

        @Schema(description = "预估毛重（kgs）")
        private BigDecimal grossWeightSum;
    }
}
